<template>
    <div class="authorDetails">
        <div class="user">
            <van-image :src="userinfo?.web_url" round class="avatar"></van-image>
            <div class="user-name">{{ userinfo.user_name }}</div>
        </div>
    </div>
</template>

<script setup lang="ts" name="authorDetails">
import {getUserInfo} from '@/api/radio';
import { useRoute } from 'vue-router';
import { onMounted, ref } from 'vue';

let route = useRoute(); 
let userinfo = ref();
onMounted(() => {

    getUserInfoData()
});

// 获取电台详细内容
let getUserInfoData = async() =>{
    userinfo.value = (await getUserInfo(route.query.id)).data;
    console.log((await getUserInfo(route.query.id)).data);
    
    
}


</script>

<style scoped>
.user{
    text-align: center;
    .avatar{
        width: 70rem;
        margin-top: 20rem;
    }
}
</style>
  